#import "SwoopCrispController.h"
        
#import "SwoopCrispModel.h"
#import "SwoopCrispCell.h"
#import "Masonry.h"

@interface SwoopCrispController () <UICollectionViewDataSource, UICollectionViewDelegate>

@property (nonatomic, strong) UICollectionView *prismOpusCollectionView;
@property (nonatomic, strong) NSMutableArray *laughterNavigateZealArray;

@end

@implementation SwoopCrispController

- (void)viewWillAppear:(BOOL)animated {
    [super viewWillAppear:animated];
}

- (void)viewDidLoad {
    [super viewDidLoad];

    [self noodleConfiglayout];
	[self infiniteNostalgiagetData];
}


//: 懒加载数据模型数组
- (NSMutableArray *)laughterNavigateZealArray {
	if (!_laughterNavigateZealArray) {
		_laughterNavigateZealArray = [NSMutableArray array];
	}
	return _laughterNavigateZealArray;
}

- (void)noodleConfiglayout {
    UICollectionViewFlowLayout *grumpyLuminary = [[UICollectionViewFlowLayout alloc] init];
    grumpyLuminary.minimumLineSpacing = 10;
    grumpyLuminary.minimumInteritemSpacing = 10;
    grumpyLuminary.itemSize = CGSizeMake(100, 100);
    grumpyLuminary.scrollDirection = UICollectionViewScrollDirectionVertical;
    
    self.prismOpusCollectionView = [[UICollectionView alloc] initWithFrame:self.view.bounds collectionViewLayout:grumpyLuminary];
    self.prismOpusCollectionView.backgroundColor = UIColor.clearColor;
    self.prismOpusCollectionView.delegate = self;
    self.prismOpusCollectionView.dataSource = self;
    self.prismOpusCollectionView.showsHorizontalScrollIndicator = NO;
    self.prismOpusCollectionView.showsVerticalScrollIndicator = NO;
    [self.prismOpusCollectionView registerClass:[SwoopCrispCell class] forCellWithReuseIdentifier:NSStringFromClass([SwoopCrispCell class])];
    
    [self.view addSubview:self.prismOpusCollectionView];
    [self.prismOpusCollectionView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.edges.equalTo(self.view);
    }];
}

//: 获取数据模型
- (void)infiniteNostalgiagetData {
	
}

#pragma mark - UICollectionView DataSource
- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section {
    return self.laughterNavigateZealArray.count;
}

- (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath {
    SwoopCrispCell *naturalGratitude = [collectionView dequeueReusableCellWithReuseIdentifier:NSStringFromClass([SwoopCrispCell class]) forIndexPath:indexPath];
    return naturalGratitude;
}

#pragma mark - UICollectionView Delegate
- (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath {
    //: collectioncell 点击
}


@end
